import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
import address from './modules/address.js'
import user from './modules/user.js'
const store = new Vuex.Store({
	state:{
		
	},
	getters:{
		myInfor:state=>state.user.myInfor,
		haveLogin:state=>{
			state.user.haveLogin=uni.getStorageSync('token')?true:false;
			return state.user.haveLogin
		},
		driveStatus:state=>{
			state.user.driverStatus=uni.getStorageSync('driveStatus')?uni.getStorageSync('driveStatus'):0;
			return state.user.driverStatus
		}
	},
	actions:{
		
	},
	mutations:{
		
	},
	modules: {
		address,
		user
	},
})
export default store